sub infix:<cmp>
1 | class Range |
1.1 | (Range) sub infix:<cmp> |
Documentation for sub infix:<cmp>
assembled from the following types:
class Range
From Range
(Range) sub infix:<cmp>
multi sub infix:<cmp>(Range \a, Range \b --> Order)multi sub infix:<cmp>(Num(Real) \a, Range \b --> Order)multi sub infix:<cmp>(Range \a, Num(Real) \b --> Order)multi sub infix:<cmp>(Positional \a, Range \b --> Order)multi sub infix:<cmp>(Range \a, Positional \b --> Order)
Compares two Range objects. If you use a Real
, it will be compared to the Range b..b
. If you use a Positional.
say (1..2) cmp (1..2); # OUTPUT: «Same»say (1..2) cmp (1..3); # OUTPUT: «Less»say (1..4) cmp (1..3); # OUTPUT: «More»say (1..2) cmp 3; # OUTPUT: «Less»say (1..2) cmp [1,2]; # OUTPUT: «Same»